<?php require_once('Connections/STN.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$id=$_GET['id'];


mysql_select_db($database_STN, $STN);
$query_RSvideo = "SELECT VID_CODIGO, VID_URL FROM tb_videos LIMIT 6;";
$RSvideo = mysql_query($query_RSvideo, $STN) or die(mysql_error());
$row_RSvideo = mysql_fetch_assoc($RSvideo);
$totalRows_RSvideo = mysql_num_rows($RSvideo);

mysql_select_db($database_STN, $STN);
$query_RSvideos2 = "SELECT vid.* FROM tb_videos vid WHERE vid.VID_CODIGO=$id;";
$RSvideos2 = mysql_query($query_RSvideos2, $STN) or die(mysql_error());
$row_RSvideos2 = mysql_fetch_assoc($RSvideos2);
$totalRows_RSvideos2 = mysql_num_rows($RSvideos2);



//limitar texto
	function limitarTexto($texto){
		$texto = substr($texto, 0, strrpos(substr($texto, 0, 200), ' '));
   		return $texto;
	}
?>



<!DOCTYPE HTML>
<html lang="pt-br">
<head>
<meta charset="utf-8" />
<title>A Sala do Tio Naldinho</title>


<link rel="stylesheet" href="css/style.css" type="text/css" >

<script type="text/javascript" src="js/jquery.js"></script>

<script type="text/javascript" src="js/banner.js"></script>

<script type="text/javascript" src="banner/jsbanner.js"></script>

<script type="text/javascript" src="js/jquery.cycle.all.js"></script>

<link rel="stylesheet" href="banner/stylebanner.css">


<script type="text/javascript" src="js/jcarousellite.js"></script>

<script type="text/javascript">

$(function(){

   $(".carosel").jCarouselLite({

     btnNext: ".next",

     btnPrev: ".prev",

     visible: 3,

     auto: 0,

     speed: 1000

   })

})
</script>

</head>

<body>

          <div class="video-video" style="box-shadow:0 0 .5em #FFFFFF;">
          <?php echo $row_RSvideos2['VID_URL'] ?>
          </div>
          <hr />
          <div class="curti" style="margin-top:20px">
    <iframe src="http://www.facebook.com/plugins/like.php?href=http://www.asaladotionaldinho.com.br/fotos.php?id<?php echo $row_RSvideos2['VID_CODIGO'] ?>
&amp;send=true&amp;layout=standard&amp;width=450&amp;show_faces=true
&amp;action=like&amp;colorscheme=light&amp;font&amp;height=80" scrolling="no" frameborder="0"
style="border:none; overflow:hidden; width:450px; height:30px;" allowTransparency="true"></iframe>
    </div>
        </div>
    
<!--fim do conteudo-->	
    
	
</body>
</html>
<?php
mysql_free_result($RSvideo);

mysql_free_result($RSvideos2);
?>
